package com.lk.demo.conf;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConfigurationProperties(prefix = "my.conf")
public class MyConf {
    private String prop1;
    private int prop2;
    private final MyConfMore more = new MyConfMore();
    public String getProp1() {
        return prop1;
    }
    public void setProp1(String prop1) {
        this.prop1 = prop1;
    }
    public int getProp2() {
        return prop2;
    }
    public void setProp2(int prop2) {
        this.prop2 = prop2;
    }
    public MyConfMore getMore() {
        return more;
    }
    public void setMore(MyConfMore more) {
    }

    public static class MyConfMore {
        private String mProp1;
        private String mProp2;
        public String getMProp1() {
            return mProp1;
        }
        public void setMProp1(String mProp1) {
            this.mProp1 = mProp1;
        }
        public String getMProp2() {
            return mProp2;
        }
        public void setMProp2(String mProp2) {
            this.mProp2 = mProp2;
        }
    }
}
